<#include '../header.ftl'>
<#if Request.flag == true>
    <h1>激活成功，5秒后跳转至首页......</h1>
    <a href="javascript:;">点击直接跳转</a>
    <script>
        let time = 5;
        const index = setInterval(function () {
            $('h1').html('激活成功，' + --time + '秒后跳转至首页......')
        }, 1000)
        const timeoutID = setTimeout(function () {
            toIndex()
        }, 5000)
        $('a').click(() => {
            toIndex()
        })
        function toIndex() {
            window.location.href = '/'
            clearInterval(index)
            clearTimeout(timeoutID)
        }
    </script>
<#else>
    <h1>激活失败</h1>
</#if>
</body>
</html>
